package com.gelonggld.translator.entry

import com.gelonggld.translator.ui.ContentDialog
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.PlatformDataKeys

class LanguageTranslator : AnAction() {
    override fun actionPerformed(e: AnActionEvent) {
        val project = e.project ?: return
        val virtualFile = e.getData(PlatformDataKeys.VIRTUAL_FILE) ?: return
        ContentDialog(project,virtualFile).isVisible = true
    }
}